<template>
	<view class="p-3">
		<!-- <view class="text-center font-bold font-36 mb-3">
			<text style="border-bottom: 2px solid #167bff;">{{title}}</text>
		</view> -->
		<u-parse :content="detailContent"></u-parse>
	</view>
</template>

<script>
	import {
		declarations
	} from '@/api/login.js'
	export default {
		data() {
			return {
				type: '',
				title: '',
				detailContent: ''
			}
		},
		onLoad(op) {
			if (op.type == 1) {
				this.title = '免责声明'

			} else if (op.type == 2) {
				this.title = '关于我们'

			} else {
				this.title = '隐私协议'
			}
			uni.setNavigationBarTitle({
				title: this.title
			})
			this.type = op.type;
			this.getData()
		},
		methods: {
			getData() {
				declarations({
					declarationType: this.type
				}).then(res => {
					this.detailContent = res.data.declaration
				})
			}
		}
	}
</script>

<style>
	page {
		background-color: #fff;
	}
</style>